#ifndef PKG_VEHICLE_H
#define PKG_VEHICLE_H

#define MAX_IMG_NUM 4
#define MAX_VIDEO_NUM 2
#define MAX_PLATE_IMG_NUM 2
#define MAX_FACE_IMG_NUM 4

struct pkg_vehicle
{
    unsigned int sequence_id;
    unsigned int realtime_data;
    char packet_id[64];

    char device_id[32];
    char addr_id[32];
    char direction_id[32];
    char camera_id[32];
    char lane_id[32];
    char addr_name[96];
    char direction_name[96];

    char plate[16];
    unsigned short plate_x;
    unsigned short plate_y;
    unsigned short plate_w;
    unsigned short plate_h;
    int plate_confidence;

    unsigned char plate_color;
    unsigned char vehicle_style;
    unsigned char vehicle_color;
    unsigned char triger_type;

    int redlight_begin_sec;
    int redlight_begin_usec;

    unsigned int vio_type;

    unsigned short vehicle_speed;
    unsigned short limit_speed;

    int recoImageIndex;
    unsigned short vehicle_x;
    unsigned short vehicle_y;
    unsigned short vehicle_w;
    unsigned short vehicle_h;

	unsigned short red_lamp_x[4];      // 4方向灯区域
	unsigned short red_lamp_y[4];
	unsigned short red_lamp_w[4];
	unsigned short red_lamp_h[4];
	unsigned short vio_red_lamp_index; // 大于等于0时为当前闯红灯对应灯索引
	unsigned char direction;           // 车辆行驶方向
    char reserved[81];

    unsigned char img_num;
    unsigned char video_num;
    unsigned char plate_img_num;
    unsigned char face_num;

    unsigned int img_len[MAX_IMG_NUM];
    unsigned int video_len[MAX_VIDEO_NUM];
    unsigned int plate_img_len[MAX_PLATE_IMG_NUM];
    unsigned int face_img_len[MAX_FACE_IMG_NUM];

    char img_format[8];
    char video_format[8];
    char plate_img_format[8];
    char face_img_format[8];

    int img_time_sec[MAX_IMG_NUM];
    int img_time_usec[MAX_IMG_NUM];

    int video_start_sec[MAX_VIDEO_NUM];
    int video_start_usec[MAX_VIDEO_NUM];
    int video_end_sec[MAX_VIDEO_NUM];
    int video_end_usec[MAX_VIDEO_NUM];

    unsigned short face_x[MAX_FACE_IMG_NUM];
    unsigned short face_y[MAX_FACE_IMG_NUM];
    unsigned short face_w[MAX_FACE_IMG_NUM];
    unsigned short face_h[MAX_FACE_IMG_NUM];

    unsigned char* img[MAX_IMG_NUM];
    unsigned char* video[MAX_VIDEO_NUM];
    unsigned char* plate_img[MAX_PLATE_IMG_NUM];
    unsigned char* face_img[MAX_FACE_IMG_NUM];
};


#endif //

